package com.maiji.cloud.service;

import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.entities.shopingmall.Goods;
import com.maiji.cloud.request.BaseDataReqDto;
import com.maiji.cloud.request.ReqMetaData;
import com.maiji.cloud.request.login.UploadImageReqData;
import com.maiji.cloud.request.shopingmall.GoodsFindAllReqData;
import com.maiji.cloud.request.shopingmall.GoodsParamByGoodsIdReqData;
import com.maiji.cloud.request.shopingmall.GoodsReqData;
import com.maiji.cloud.request.shopingmall.ParamConfigReqData;
import com.maiji.cloud.response.BaseDataResDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.shopingmall.GoodsParamConfigResData;
import com.maiji.cloud.response.shopingmall.GoodsResData;
import com.maiji.cloud.response.shopingmall.ParamConfigResData;

import java.util.List;

public interface GoodsService extends IService<Goods> {

    public static final String REDISNAMESPACE = "goods";

    BaseDataResDto<GoodsResData> findGoodsById(String goodsId, String token);

    GoodsResData findGoodsById(String goodsId);

    BaseMetaResDto<List<GoodsResData>> findAllGoods(GoodsFindAllReqData data, ReqMetaData metaData, String token);

    BaseResDto addGoods(GoodsReqData data) throws Exception;

    BaseResDto updateGoods(GoodsReqData goodsReqData) throws Exception;

    BaseDataResDto<List<String>> findAllLabelsByGoodsId(String goodsId);

    BaseResDto updateGoodsLabels(String userId, String goodsId, List<String> delLabelIds, List<String> addLabelIds);

    BaseResDto updateGoodsImages(String goodsId, List<UploadImageReqData> goodsCarouselImgs);

    BaseMetaResDto<List<GoodsResData>> findAllGoodsByFoodIds(List<String> foodIds, ReqMetaData reqMetaData);

    BaseMetaResDto<List<GoodsResData>> findAllGoodsByLabel(String goodsName, String labelName, ReqMetaData metaData, String token);

    List<GoodsResData> findAllGoodsResData(List<Goods> goodsList, String token);

    BaseMetaResDto<List<GoodsResData>> findAllNewExchangeGoods(ReqMetaData reqMetaData, String token);

    BaseDataResDto<Integer> IncreasestockVolumeCount(Integer min);

}
